package com.lqd.demo.springboot.orm.mybatis.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.lqd.demo.springboot.orm.mybatis.bean.UserLoginLog;


public interface UserLoginLogMapper {

	@Select("select * from t_e_user_login_test_log where username = #{name}")
	@Results({
		@Result(property="userid",column="username"),
		@Result(property="ipaddress",column="ipaddress")
	})
	public List<UserLoginLog> getByName(String name);
	
	@Insert("insert into t_e_user_login_test_log(username,systemname) values (#{username},#{systemname})")
	@Options(useGeneratedKeys=true,keyProperty="id",keyColumn="id")
	public void save(UserLoginLog userLoginLog);
	//@update
	//@Delete
	//@Insert
}
